#include<iostream>
using namespace std;
class Figure
{
	int sidenum;
public:
	Figure(int sid) :sidenum(sid) 
	{
		cout << "The figure has " << sidenum << " sides." << endl;
	}
};
class Quadrangle1 :virtual public Figure
{
public:
	Quadrangle1(int sidnum) :Figure(sidnum) 
	{
		cout << "This is a quadrilateral with two diagonal lines perpendicular to each other." << endl;
	}
};
class Parallelogram :virtual public Figure
{
public:
	Parallelogram(int sidnum) :Figure(sidnum) 
	{
		cout << "This is a parallelogram." << endl;
	}
};
class Quadrangle2 :virtual public Figure
{
public:
	Quadrangle2(int sidnum) :Figure(sidnum) 
	{
		cout << "This is a quadrilateral with four 90 degree interior angles." << endl;
	}
};
class Rhombus :virtual public Quadrangle1, virtual public Parallelogram
{
	float sidelength;
public:
	Rhombus(float sidelenghth, int sidnum) :sidelength(sidelenghth), Quadrangle1(sidnum), Parallelogram(sidnum), Figure(sidnum) 
	{
		cout << "This is a rhombus." << endl;
	}
};
class Rectangle :virtual public Quadrangle2, virtual public Parallelogram
{
	float angle;
public:
	Rectangle(float angle,int sidnum):angle(angle), Quadrangle2(sidnum), Parallelogram(sidnum), Figure(sidnum) 
	{
		cout << "This is a rectangle." << endl;
	}
};
class Square :virtual public Rhombus, virtual public Rectangle
{
public:
	Square(int sidnum, float sidelength, float angle) :Rhombus(sidelength, sidnum), Rectangle(angle, sidnum), Quadrangle1(sidnum), Parallelogram(sidnum), Quadrangle2(sidnum), Figure(sidnum)
	{
		cout << "The figure is a square!" << endl;
		cout << "All angles of the square are " << angle << " degrees." << endl; 
		cout << "The sidelength of the square is " << sidelength << "." << endl; 
		cout << "The area of the square is " << sidelength * sidelength << endl;
	}
};
int main()
{
	Square const s(4, 10, 90);
}